package com.yjt.javatest.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class CategorizedQuestion extends Category{
    private List<Question> questions;
    private List<CategorizedQuestion> children;
    public CategorizedQuestion(Category category) {
        this.setFatherId(category.getFatherId());
        this.setUserId(category.getUserId());
        this.setId(category.getId());
        this.setName(category.getName());
        this.setChildren(new ArrayList<>());
    }
}
